<div>
	<?php
	echo '<div> <h3>Find Open Deals Sitemap - Browse by categories</h3><ul>';
	if ($categories->num_rows() > 0)
	{
		foreach ($categories->result() as $row)
		{
			if($row->parent_category_id == 0)
			{
				$tree_start = $row->tree_start;
				$tree_end = $row->tree_end;
				echo '<li id="" style="display:block;list-style:none;">', ' <a style="font-weight:bold;" rel="noindex,follow" href="', get_category_url($row, 1),'">',$row->category_name,'</a> ';
				
			}
			else 
			{	
				if($row->tree_order  == $tree_start + 1) echo '<ul>';					
				echo '<li style="display:inline;list-style:none;">&nbsp;<a rel="noindex,follow" href="', get_category_url($row, 1), '">', $row->category_name, '</a> | </li>';
				if($row->tree_order == $tree_end) echo '</li></ul>';
			}
		
		}
		echo '</li></ul>';
	}
	echo '</ul></div>';
	?>
</div>